package aidlserver.app

import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.example.commonlib.CLogUtil

/**
 * aidl 服务端
 */
class ServiceMainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val readInfoText = findViewById<TextView>(R.id.readInfoText)
        UiHelper.addCallback {
            CLogUtil.d("addCallback $it")
            readInfoText.text = it
        }
    }

    override fun onDestroy() {
        super.onDestroy()
        UiHelper.clear()
    }
}